package io.renren.modules.app.service.impl;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.modules.app.dao.WxOrderPayDao;
import io.renren.modules.app.entity.WxOrderPay;
import io.renren.modules.app.service.WxOrderPayService;
import org.springframework.stereotype.Service;


@Service("WxOrderPayService")
public class WxOrderPayServiceImpl extends ServiceImpl<WxOrderPayDao, WxOrderPay> implements WxOrderPayService {

    @Override
    public void insetrByWxOrderPay(WxOrderPay wxOrderPay) {
        baseMapper.insert(wxOrderPay);
    }

    @Override
    public WxOrderPay selectByWxOrderPay(String orderid) {
        WxOrderPay wxOrderPay = new WxOrderPay();
        wxOrderPay.setOrderid(orderid);
        return baseMapper.selectOne(wxOrderPay);
    }

    @Override
    public void updateByWxOrderPay(WxOrderPay wxOrderPay, String orderid) {

        baseMapper.update(wxOrderPay,new EntityWrapper<WxOrderPay>()
                .where("orderid={0}",orderid));
    }
}
